package net.mihome.app.ui;

import android.os.Bundle;
import android.view.View;
import android.widget.ProgressBar;
import android.widget.TextView;

import net.mihome.app.R;
import net.mihome.app.ui.view.MifuwuDianpuListView;
import net.mihome.app.ui.view.MyViewLinster;

public class MifuwuDianpuMainActivity extends BaseActivity {
    /**
     * 展示类型 0商铺  1家政
     * */
    public static final int SHOP_SHOW_TYPE_SHANGPU=0;
    public static final int SHOP_SHOW_TYPE_JIAZHENG=1;
 	MifuwuDianpuListView mifuwuDianpuListView;
	ProgressBar progressBar;
    TextView titleTextview;
    View backView;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
        //
        String title=getIntent().getStringExtra("title");
        int showType=getIntent().getIntExtra("type",0);
        //
		setContentView(R.layout.mifuwu_dianpu);
        backView=findViewById(R.id.mifuwu_baoxiu_home);
        backView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
        titleTextview= (TextView) findViewById(R.id.mifuwu_baoxiu_head_title_id);
        titleTextview.setText(title);
        mifuwuDianpuListView=(MifuwuDianpuListView) findViewById(R.id.mifuwu_dianpu_listview);
		progressBar=(ProgressBar) findViewById(R.id.dianpu_head_progress);
        progressBar.setVisibility(View.VISIBLE);
        mifuwuDianpuListView.setMyViewLinster(new MyViewLinster() {
			
			@Override
			public void onLoadComplete() {
				// TODO Auto-generated method stub
				
			}
			
			@Override
			public void onBeforeLoad() {
				// TODO Auto-generated method stub
				progressBar.setVisibility(View.GONE);
			}
		});
        mifuwuDianpuListView.setShowType(showType);
        mifuwuDianpuListView.initData();
	}

	
}
